package com.ad.pet.models.remote.account;

import android.support.annotation.NonNull;

import java.io.File;
import java.io.Serializable;

/**
 * Created by SEELE on 2019/2/13.
 */

public class PicPath implements Serializable,Comparable<PicPath>{
    long id;
    private String pic_path;
    private File file;

    public PicPath(long id, String pic_path,File file) {
        this.id = id;
        this.pic_path = pic_path;
        this.file = file;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PicPath picPath = (PicPath) o;

        if (id != picPath.id) return false;
        return pic_path != null ? pic_path.equals(picPath.pic_path) : picPath.pic_path == null;
    }



    public String getPic_path() {
        return pic_path;
    }

    public void setPic_path(String pic_path) {
        this.pic_path = pic_path;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Override
    public int compareTo(@NonNull PicPath picPath) {
        if (this.id > picPath.getId()) {
            return -1;
        } else if (this.id == picPath.getId()) {
            return 0;
        } else if (this.id < picPath.getId()) {
            return 1;
        }

        return 0;
    }

    public File getFile() {
        return file;
    }

    public void setFile(File file) {
        this.file = file;
    }
}
